Skip to content

Conversation

@arunsl
Copy link
Contributor

@arunsl arunsl commented Oct 12, 2016

Need to write logic within individual commands and update tests.
Had to move one test to future-fact as the same I was not sure of the behaviour.

:else
(assoc :message [:white :red (str ":" command-line " is not a thing")]))))
[editor command-line-raw]
(let [force? (have-exclamation? command-line-raw)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you know that Clojure symbols can have ! in them?

I would just define w! and wq! and so forth as separate commands in avi.commands.

(fact "`:q<Enter>` exits Avi"
(editor :after ":q<Enter>") => finished?)
(fact "`:q!<Enter>` does not exit Avi"
(future-fact "`:q!<Enter>` does not exit Avi"
Copy link
Member

@eraserhd eraserhd Oct 12, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, if you see a test like this, it's calling out that the behavior is intentional. In this case, though, we were trying to come up with a different model for saving, but never succeeded. So I would just change this to a

(fact "`:q!<Enter>` exits Avi"
  ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants